class Download
	require 'uri'
	require 'net/http'
	require 'net/ftp'
	attr_accessor :name,:tempdir,:size,:link
	def initialize(link,headers=nil)
		@link = link
		@headers = headers
	end
	def delete_temp
		File.delete(File.join(@tempdir,@name))
	end
	def upload_temp(ipserver,ftpuser,ftppass,remotedir)
		con=Net::FTP.new(ipserver)
		con.login(ftpuser,ftppass)
		con.chdir(remotedir)
		con.putbinaryfile(File.join(@tempdir,@name))	
		con.close
	end
end
